package it.eng.area118.mdocommon.android.rest;

import java.net.URI;
import java.util.Map;

import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RequestCallback;
import org.springframework.web.client.ResponseExtractor;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;

/**
 * 
 * 
 * @author Luigi
 *
 */
public class AndroidRestClient extends RestTemplate {

	@Override
	public <T> ResponseEntity<T> exchange(URI url, HttpMethod method,
			HttpEntity<?> requestEntity, Class<T> responseType)
			throws RestClientException {
		// XXX Auto-generated method stub
		return super.exchange(url, method, requestEntity, responseType);
	}

	@Override
	public <T> ResponseEntity<T> exchange(String url, HttpMethod method,
			HttpEntity<?> requestEntity, Class<T> responseType,
			Map<String, ?> uriVariables) throws RestClientException {
		// XXX Auto-generated method stub
		ResponseEntity<T> resp = super.exchange(url, method, requestEntity,
				responseType, uriVariables);
		resp.getBody();
		return resp;
	}

	@Override
	protected <T> T doExecute(URI arg0, HttpMethod arg1, RequestCallback arg2,
			ResponseExtractor<T> arg3) throws RestClientException {

		return super.doExecute(arg0, arg1, arg2, arg3);
	}

	@Override
	public <T> T execute(String url, HttpMethod method,
			RequestCallback requestCallback,
			ResponseExtractor<T> responseExtractor, Map<String, ?> urlVariables)
			throws RestClientException {

		return super.execute(url, method, requestCallback, responseExtractor,
				urlVariables);
	}

}
